<div class="row justify-content-center">
  <div class="col-md-8 col-lg-6">
    <div class="card mx-4">
      <ul class="nav nav-tabs nav-fill">
        <%- if devise_mapping.database_authenticatable? %>
          <li class="nav-item">
            <%= link_to t("users.sessions.new.title"), new_user_session_path, class: "nav-link" %>
          </li>
        <% end %>
        <li class="nav-item">
          <%= link_to t("users.registrations.new.title"), new_user_registration_path, class: "nav-link active" %>
        </li>
      </ul>

      <div class="card-body p-4">
        <%= form_with(model: resource, as: resource_name, url: registration_path(resource_name), local: true) do |f| %>
          <div class="form-group">
            <%= f.label :email %>
            <%= f.email_field :email, id: "user_email", autocomplete: "username", autofocus: true, required: "required", class: "form-control", class_for_error: "is-invalid" %>
            <%= f.error_message :email, class: "invalid-feedback" %>
          </div>

          <div class="form-group">
            <%= f.label :password %>
            <%= f.password_field :password, id: "user_password", autocomplete: "new-password", required: "required", class: "form-control", class_for_error: "is-invalid" %>
            <%= f.error_message :password, class: "invalid-feedback" %>
          </div>

          <div class="form-group">
            <%= f.label :password_confirmation %>
            <%= f.password_field :password_confirmation, id: "user_password_confirmation", autocomplete: "new-password", required: "required", class: "form-control", class_for_error: "is-invalid" %>
            <%= f.error_message :password_confirmation, class: "invalid-feedback" %>
          </div>

          <%= f.submit t(".submit"), class: "btn btn-block btn-primary" %>
        <% end %>
      </div>
    </div>
  </div>
</div>

<%#- if devise_mapping.confirmable? %>
<!--  <div class="block text-center">-->
    <%#= link_to t(".didn_t_receive_confirmation_instructions"), new_confirmation_path(resource_name) %>
<!--  </div>-->
<%# end -%>
